#ifndef QUMI_temp_TABLE_H
#define QUMI_temp_TABLE_H

#include "humidity.h"

//start 25%
uint16_t temp_0[] =
{
  0,
  42 ,
  46 ,
  55 ,
  72 ,
  105,
  157,
  246,
  353,
  481,
  601,
  716,
  787,
  851,
  896,
  931,
};

//start 25%
uint16_t temp_5[] =
{
  0,
  43,
  49,
  62,
  83,
  129,
  199,
  300,
  410,
  539,
  635,
  765,
  832,
  882,
  918,
  944,
};

//start 20%
uint16_t temp_10[] =
{
  42,
  46,
  54,
  72,
  107,
  165,
  253,
  356,
  466,
  583,
  689,
  793,
  862,
  904,
  938,
  960,
};


//start 20%
uint16_t temp_15[] =
{
  43,
  48,
  59,
  82,
  126,
  197,
  300,
  414,
  535,
  646,
  745,
  828,
  886,
  916,
  947,
  969,
};

//start 20%
uint16_t temp_20[] =
{
  46,
  53,
  65,
  94,
  148,
  235,
  356,
  476,
  594,
  703,
  793,
  856,
  902,
  938,
  962,
  974,
};

uint16_t temp_25[] =
{
  48,
  57,
  74,
  96,
  179,
  253,
  399,
  504,
  650,
  755,
  817,
  886,
  923,
  953,
  974,
  979,
};


uint16_t temp_30[] =
{
  51,
  64,
  77,
  126,
  195,
  293,
  434,
  563,
  681,
  787,
  847,
  898,
  933,
  960,
  979,
  984,
};

uint16_t temp_35[] =
{
  55,
  71,
  94,
  142,
  212,
  331,
  476,
  612,
  717,
  815,
  873,
  918,
  947,
  972,
  989,
  991,
};

uint16_t temp_40[] =
{
  59,
  82,
  110,
  169,
  250,
  399,
  528,
  660,
  756,
  839,
  898,
  931,
  960,
  981,
  993,
  996,
};

uint16_t temp_45[] =
{
  66,
  92,
  120,
  199,
  315,
  452,
  586,
  705,
  801,
  869,
  918,
  951,
  972,
  989,
  998,
  998,
};

uint16_t temp_50[] =
{
  72 ,
  105,
  144,
  246,
  348,
  504,
  640,
  756,
  833,
  892,
  938,
  965,
  977,
  993,
  1001,
  1001,
};

#define ADC_TBL_LEN    (16)


struct humi_table_s g_humi_adc_tbl[] =
{
  //temp 0
  {0, temp_0},
  //temp 5
  {5, temp_5},
  //temp 10
  {10, temp_10},
  //temp 15
  {15, temp_15},
  //temp 20
  {20, temp_20},
  //temp 25
  {25, temp_25},
  //temp 30
  {30, temp_30},
  //temp 35
  {35, temp_35},
  //temp 40
  {40, temp_40},
  //temp 45
  {45, temp_45},
  //temp 50
  {50, temp_50},
};

#define HUMI_ADC_TBL_SIZE  (11)
#define START_HUMIDITY     (20)

#endif
